﻿<div class="top-row pl-4 navbar navbar-dark">
    <a class="navbar-brand" href="">ZXingBlazor</a>
    <button class="navbar-toggler" @onclick="ToggleNavMenu">
        <span class="navbar-toggler-icon"></span>
    </button>
</div>

<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
    <ul class="nav flex-column">
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="" Match="NavLinkMatch.All">
                <span class="oi oi-camera-slr" aria-hidden="true"></span>  Barcode
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="barcodereader" Match="NavLinkMatch.All">
                <span class="oi oi-camera-slr" aria-hidden="true"></span> 条码扫描 Barcode
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="handwritten">
                <span class="oi oi-pencil" aria-hidden="true"></span> 手写签名 Handwritten
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="viewer">
                <span class="oi oi-plus" aria-hidden="true"></span> 图片浏览器 Viewer
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="https://zxingblazor.app1.es/">
                <span class="oi oi-globe" aria-hidden="true"></span> ssr demo
            </NavLink>
        </li>
        <li class="nav-item px-3">
            <NavLink class="nav-link" href="https://zxingblazorwasm.app1.es/">
                <span class="oi oi-globe" aria-hidden="true"></span> wasm demo
            </NavLink>
        </li>
    </ul>
</div>

@code {
    private bool collapseNavMenu = true;

    private string NavMenuCssClass => collapseNavMenu ? "collapse" : null;

    private void ToggleNavMenu()
    {
        collapseNavMenu = !collapseNavMenu;
    }
}
